#define ElemType int

#include "common.h"

int minMoves(int* nums, int numsSize);

int main()
{
	return 0;
}

int minMoves(int* nums, int numsSize)
{
	long sum = 0;
	int min = INT_MAX;

	for (int i = 0; i < numsSize; i++) {
		int num = nums[i];
		sum += num;
		min = num < min ? num : min;
	}

	return sum - min * numsSize;
}
